<template>
	<view class="tutorial_detail_container">
		<view class="tutorial_detail_box">
			<view class="tutorial_detail_title">
				{{tutorialDetail.module}}
			</view>
			<view class="">
				<u-parse :html="tutorialDetail.content"></u-parse>
			</view>
			<view class="tutorial_detail_video">
				<video :src="tutorialDetail.video" class="detail_video"></video>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				tutorialDetail: {}
			}
		},
		onLoad(options) {
			this.getSystemInstructionsInfo(options.id)
		},
		methods: {
			// 查看单条接口
			getSystemInstructionsInfo(val) {
				this.$request('/api/getSystemInstructionsInfo', {
					id: val
				}, 'GET').then(res => {
					if (res.code == 1) {
						this.tutorialDetail = res.data
					} else {
						uni.showToast({
							title: '查看教程详情失败',
							icon: 'none'
						})
						return
					}
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.tutorial_detail_container {

		.tutorial_detail_box {
			padding: 30rpx;
			
			.tutorial_detail_title {
				font-size: 32rpx;
				font-weight: 550;
				text-align: center;
				padding-bottom: 20rpx;
			}
			
			.tutorial_detail_video {
				display: flex;
				justify-content: center;
				padding-top: 30rpx;
				
				.detail_video {
					height: 600rpx;
				}
			}
		}
	}
</style>